public class J03Loop {
    public static void main(String[] args) {
        /*
        1 2 3 4 5
        1 2 3 4 5
        1 2 3 4 5
         */
        /*1*/
//        System.out.println("1 2 3 4 5");
//        System.out.println("1 2 3 4 5");
//        System.out.println("1 2 3 4 5");
//        //2
//        for (int i = 0; i < 100000; i++) {
//            System.out.println("1 2 3 4 5 6 7 ....1亿");
//        }
        System.out.println("=======");
        //3个1-5
        //控制行数
        for (int i = 1; i <= 3; i++) {
            //列数
            for (int j = 1; j <= 5; j++) {
                System.out.print(j + " ");

            }
            System.out.println();
        }
    }
}

//break，continue
//就近原则

class Loop2Test{
    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            for (int j = 0; j < 10; j++) {
                if(j>5){
                    continue;
                }
                System.out.print("*");
            }
            System.out.println();
        }
    }
}

//break,switch，就近原则
class LoopSwitchBreak{
    public static void main(String[] args) {
        for (int i = 0; i < 5; i++) {
            int month = 3;
            switch (month){
                case 3:
                    System.out.println("3月份");
                    break;
            }
        }
    }
}

/*
5!  = 1 *2...*5
50
 */
